package com.jd.sys.mapper;

import com.jd.sys.domain.Role;
import com.jd.basic.mapper.BaseMapper;
import com.jd.sys.vo.EmpAndRoleVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author É°Ç³
 * @since 2023-03-09
 */
public interface RoleMapper extends BaseMapper<Role> {

    List<EmpAndRoleVo> findByEmpIds(List<Long> empIds);

    void removeRoleMenu(Long id);

    void removeRolePermission(Long id);

    void addRoleMenu(@Param("roleId") Long roleId, @Param("menus") List<Long> menus);

    void addRolePermission(@Param("roleId")Long roleId,@Param("permissions") List<Long> permission);

    void addMiddle(@Param("empId") Long id,@Param("roles") List<Long> roles);

}
